package com.kai.module_read.list

import android.widget.Button
import android.widget.ImageView
import android.widget.TextView
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.kai.base.base.activity.BaseRecyclerActivity
import com.kai.lib_app.core.RouterHub
import com.kai.lib_app.utlis.BundleKey
import com.kai.module_read.R

/**
 * @Author: 小强同学
 * @Date:  2021/3/24 14:20
 * @Description:  阅读器列表
 */

@Route(path = RouterHub.ROUTER_PUBLIC_FRAGMENT_LIST)
class ReadingListActivity : BaseRecyclerActivity<ReadingListModel, ReadingBean, ReadingBean>() {


    @Autowired(name = BundleKey.READING_TITLE)
    @JvmField
    var title: String = ""

    @Autowired(name = BundleKey.READING_INDEX)
    @JvmField
    var urlIndex: String = ""

    override fun getPageTitle(): String? {
        return title
    }

    override fun getAdapter() = ChapterAdapter()

    override fun addHeadView() = R.layout.read_list_head

    override fun initView() {
        mBaseRecylerBinding.headLayout.apply {
            var imageView = this.findViewById<ImageView>(R.id.rlh_im)
            var rlhTvTitle = this.findViewById<TextView>(R.id.rlh_tvTitle)
            var rlhTvAuthor = this.findViewById<TextView>(R.id.rlh_tvAuthor)
            var rlhTvUpdateTime = this.findViewById<TextView>(R.id.rlh_tvUpdateTime)
            var rlhTvCategory = this.findViewById<TextView>(R.id.rlh_tvCategory)
            var rlhTvSerial = this.findViewById<TextView>(R.id.rlh_tvSerial)
            var rlhTvMsg = this.findViewById<TextView>(R.id.rlh_tvMsg)
            var rlhTvStart = this.findViewById<Button>(R.id.rlh_tvStart)
            rlhTvTitle.setText("斗破仓求")

//            bookchapter
        }
    }

    override fun initEvents() {

    }

    override fun initData() {

    }
}